Many modern day electronic devices contain an electronic memory. The Electronic memory may be a volatile memory or a non-volatile memory. The non-volatile memory is able to retain its stored data in the absence of power, whereas the volatile memory loses its data memory contents when power is lost. A magnetoresistive random-access memory (MRAM) is one of promising candidates for the next generation of non-volatile electronic memory due to advantages over conventional electronic memories. Compared to the conventional non-volatile memory, such as a flash random-access memory, the MRAM typically is faster and has better endurance. Compared to the conventional volatile memory, such as a dynamic random-access memory (DRAM) or a static random-access memory (SRAM), the MRAM typically has similar performance and density, but lower power consumption.